//
//  YLTitleAllowCell.m
//  YLFinanceService
//
//  Created by she1323 on 2017/8/25.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLTitleAllowCell.h"
#import "YLGlobeHeader.h"
#import "YLIconTitleModel.h"
#import "YLFuncDetailModel.h"
@interface YLTitleAllowCell ()
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *icon;

@end

@implementation YLTitleAllowCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _contentLabel.textColor = YLLOrgColor;
}


- (void)setContentModel:(YLIconTitleContentModel *)contentModel
{
    _contentModel = contentModel;
    _contentLabel.textColor = contentModel.contentColor;
    _contentLabel.text = contentModel.content;
    
    if (contentModel.content == 0) {
        _contentLabel.hidden = YES;
        
    }
    
    _titleLabel.text = contentModel.title;
    _icon.image = [UIImage imageNamed:contentModel.icon];
    
}

- (void)setModel:(YLFuncDetailModel *)model
{
    _model = model;
    _contentLabel.textColor = YLLineColor;
    _contentLabel.text = model.content;
    _titleLabel.text = model.title;
    _icon.image = [UIImage imageNamed:model.icon];
    
}

+ (NSString *)cellID
{
    return @"YLTitleAllowCell";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
